package com.usermanagement.dto;

import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

@Data
public class LoginDTO {

    /**
     * 用户名或电子邮件
     */
    @NotBlank(message = "用户名或电子邮件不能为空")
    @ApiModelProperty(value = "用户名或电子邮件")
    private String usernameOrEmail;

    /**
     * 密码哈希
     */
    @NotBlank(message = "密码哈希不能为空")
    @Length(min = 60, max = 60, message = "密码哈希长度应为60")
    @ApiModelProperty(value = "密码哈希")
    private String passwordHash;
}